<template>
	<view class="container">
		<cu-header bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content" class="page-name">地址列表</block>
		</cu-header>
		<view class="contents">
			<view class="padding-sm" v-for="(item,index) in 3" :key="index" @click="onSeletAddress">
				<view class="bg-white  radius">
					<view class="flex justify-center align-center padding-sm">
						<view class="cuIcon-location size-84 text-red"></view>
						<view class="margin-left-sm">
							<view>
								<text class="text-black text-size-32 text-blod">孙秋龙</text>
								<text class="text-gray text-size-16 margin-left-sm">18716643045</text>
							</view>
							<view>
								湖南省岳麓区丰顺路卫生院13东123号
							</view>
						</view>
						<view class="cuIcon-right size-36 margin-left-sm"></view>
					</view>
					<view class="flex justify-between padding-sm solid-top">
						<view>
							<text class="cuIcon-roundcheck"></text>
							<text class="margin-left-sm">默认地址</text>
						</view>
						<view>删除</view>
					</view>
				</view>
			</view>
			<view style="height: 100rpx;"></view>
		</view>
		<view class="fixed foot flex flex-wrap padding">
			<button @click="$util.redirectTo('/pages/shop/address/create')"
				class="cu-btn round bg-orange flex-sub">创建地址</button>
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	import cuListAftersale from '@/components/diy/list/cu-list-aftersale.vue';
	export default {
		computed: {
			...mapState(['hasLogin', 'forcedLogin', 'userinfo'])
		},
		components: {
			cuListAftersale
		},
		data() {
			return {
				lists: [{
						name: '以纯',
						status: 1,
						goods: [{
								name: "时尚运动鞋",
								price: 150,
								number: 2,
								image: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg'
							},
							{
								name: "运动套装",
								price: 280,
								number: 2,
								image: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg'
							}
						]
					},
					{
						name: '美特斯邦威',
						status: 1,
						goods: [{
							name: "夏季时尚短袖",
							price: 150,
							number: 2,
							image: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg'
						}]
					},
					{
						name: '李宁',
						status: 1,
						goods: [{
							name: "男鞋2021新款网面沙滩鞋",
							price: 150,
							number: 2,
							image: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10006.jpg'
						}]
					}
				]
			};
		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function(res) {
			if (res.from === 'button') {
				// 来自页面内分享按钮
				console.log(res.target);
			}
			return this.shareinfo;
		},
		onLoad() {},
		onShow() {

		},
		methods: {
			...mapMutations(['logout', 'login', 'loginsoure']),
			onSelect: function(e) {
				this.$util.redirectTo('/pages/shop/aftersale/details')
			}

		}
	};
</script>

<style scoped></style>
